import request from '@/utils/request'

export function login({ username }) {
  return request({
    url: '/v1/auth/user/login',
    method: 'post',
    data: {
      username
    }
  })
}

export function getInfo() {
  return request({
    url: '/v1/auth/user/info',
    method: 'get'
  })
}

export function getMenu() {
  return request({
    url: '/v1/auth/user/menus',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  })
}
